package com.yn.common.response.driver;

import cn.hutool.core.bean.BeanUtil;
import com.yn.common.model.zy.CarDeparturePlanDO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="DeparturePlanResponse对象", description="返程计划列表返回对象")
public class DeparturePlanResponse {

    @ApiModelProperty(value = "id")
    private Integer id ;

    @ApiModelProperty(value = "目的地区编码")
    private String startRegionCode;

    @ApiModelProperty(value = "出发地区编码")

    private String endRegionCode;

    @ApiModelProperty(value = "目的地区域中文")
    private String startDestination;

    @ApiModelProperty(value = "出发地区域中文")
    private String endDestination;

    @ApiModelProperty(value = "出发地址经纬度")
    private String startLocality;

    @ApiModelProperty(value = "目的地址经纬度")
    private String endLocality;



    @ApiModelProperty(value = "起始省级id")
    private Integer startProvinceId;

    @ApiModelProperty(value = "目的省级id")
    private Integer endProvinceId;

    @ApiModelProperty(value = "起始市级id")
    private Integer startCityId;

    @ApiModelProperty(value = "目的市级id")
    private Integer endCityId;

    @ApiModelProperty(value = "起始区级id")
    private Integer startDistrictId;

    @ApiModelProperty(value = "目的区级id")
    private Integer endDistrictId;




    @ApiModelProperty(value = "发车时间")
    private String departureTime; // 若用LocalDateTime等类型，注意前后端时间格式转换，这里先示例用String，也可根据实际改

    @ApiModelProperty(value = "发车人id")
    private Integer appUserId;

    @ApiModelProperty(value = "车队id")
    private Integer carFleetId;

    @ApiModelProperty(value = "车队名称")
    private String carFleetName;

    @ApiModelProperty(value = "车队联系人")
    private String fleetCuratorName;

    @ApiModelProperty(value = "车队联系电话")
    private String fleetCuratorPhonenumber;


    public static DeparturePlanResponse transform(CarDeparturePlanDO carDeparturePlanDO) {
        DeparturePlanResponse response = new DeparturePlanResponse();
        BeanUtil.copyProperties(carDeparturePlanDO, response);
        return response;
    }

}
